package echat.future.cn.echat.video.domain;

import android.text.TextUtils;

import java.util.List;

/**
 * Created by Administrator on 2018/8/14.
 */

public class VideoData {
    private String id;//: 6,
    private String video;//: "http://echat-voide.oss-cn-beijing.aliyuncs.com/2_2018-09-03-16-46-051357.mp4",
    private String img;//: "http://echat-voide.oss-cn-beijing.aliyuncs.com/2_2018-09-03-16-46-072853.jpg",
    private String avatar;//
    private String type;//: 1,[1.免费2.付费]
    private String member_id;//: 4,
    private String view_num;//: 1,
    private String anchor_status;//: 0,
    private String price;//: 22,
    private String sign;//: null,
    private String username;//: "nancy",
    private String colletion_num;//: 0,
    private List<CloseData> close_list;
    private String is_focus;//: 1,
    private String is_collection;//: 0
    private String first_free;//是否限免
    private String mobile;
    private String can_see;
    private String video_price;
    private String gift_num;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getVideo() {
        return video;
    }

    public void setVideo(String video) {
        this.video = video;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getMember_id() {
        return member_id;
    }

    public void setMember_id(String member_id) {
        this.member_id = member_id;
    }

    public int getView_num() {
        try {
        	return Integer.valueOf(view_num);
        } catch (Exception e) {
            // TODO: handle exception
        }
        return 0;
    }

    public void setView_num(String view_num) {
        this.view_num = view_num;
    }

    public String getAnchor_status() {
        return anchor_status;
    }

    public void setAnchor_status(String anchor_status) {
        this.anchor_status = anchor_status;
    }

    public int getPrice() {
        try {
            return Integer.valueOf(price);
        } catch (Exception e) {
            // TODO: handle exception
        }
        return 0;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getColletion_num() {
        try {
            return Integer.valueOf(colletion_num);
        } catch (Exception e) {
            // TODO: handle exception
        }
        return 0;
    }

    public void setColletion_num(String colletion_num) {
        this.colletion_num = colletion_num;
    }

    public List<CloseData> getClose_list() {
        return close_list;
    }

    public void setClose_list(List<CloseData> close_list) {
        this.close_list = close_list;
    }

    public boolean getIs_focus() {
        return "1".equals(is_focus);
    }

    public void setIs_focus(String is_focus) {
        this.is_focus = is_focus;
    }

    public boolean getIs_collection() {
        return "1".equals(is_collection);
    }

    public void setIs_collection(String is_collection) {
        this.is_collection = is_collection;
    }

    public boolean getFirst_free() {
        return false;
//        return "1".equals(first_free);
    }

    public void setFirst_free(String first_free) {
        this.first_free = first_free;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public boolean getCan_see() {
//        return true;
        return "1".equals(can_see) || "1".equals(type);
    }

    public void setCan_see(String can_see) {
        this.can_see = can_see;
    }

    public String getVideo_price() {
        return video_price;
    }

    public void setVideo_price(String video_price) {
        this.video_price = video_price;
    }

    public String getGift_num() {
        if(TextUtils.isEmpty(gift_num))
            return "0";
        return gift_num;
    }

    public void setGift_num(String gift_num) {
        this.gift_num = gift_num;
    }
}
